﻿#region Copyright Notice
// 
// 
// Copyright (c) 2009-2010 Anindya Chatterjee
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 
// 
// 
#endregion
namespace GCodeIssueTracker
{
    /// <example>
    /// <code>
    /// 
    /// using System;
    /// using GCodeIssueTracker;
    /// using System.Net;
    /// using GCodeIssueTracker.Query;
    /// using System.Collections.Generic;
    /// using GCore;
    /// 
    /// internal class Program
    /// {
    ///    private static void Main()
    ///    {
    ///         var service = new ProjectHostingService("demo")
    ///                          {
    ///                              GUserName = "someone@gmail.com",
    ///                              GPassword = "password123"
    ///                          };
    ///         // getting all issues
    ///         IssuesFeed resultFeed = service.GetAllIssues();
    ///         if (resultFeed != null) Console.WriteLine(resultFeed.Entries.Count);
    ///         
    ///         // submitting a new issue
    ///         var newEntry = new IssuesEntry
    ///                           {
    ///                               Author = new Author { Name = "someone" },
    ///                               Content = new Content { Type = "text", Description = "Test Issue Submission" },
    ///                               Owner = new Owner { UserName = "someother" },
    ///                               Status = "New",
    ///                               Title = "Test One",
    ///                               Labels = new List&lt;string&gt; { "Priority-Medium" },
    ///                               Ccs = new List&lt;Cc&gt; { new Cc { UserName = "another" } }
    ///                           };
    ///        int id = service.SubmitNewIssue(newEntry, "demoapp").Id;
    ///        Console.WriteLine(id);
    ///        
    ///        // querying using parameters
    ///        var query = new IssueQuery();
    ///        query.AppendQuery(QueryParamType.CanAll, "");
    ///        query.AppendQuery(QueryParamType.Author, "someauthor");
    ///        query.AppendQuery(QueryParamType.Label, "High");
    ///        query.AppendQuery(QueryParamType.MaxResults, "1000");
    ///        query.AppendQuery(QueryParamType.Owner, "someowner");
    ///        query.AppendQuery(QueryParamType.PublishedDateMax, Utility.ToFriendlyDateString(DateTime.Today));
    ///        query.AppendQuery(QueryParamType.PublishedDateMin, Utility.ToFriendlyDateString(DateTime.Today));
    ///        query.AppendQuery(QueryParamType.QueryString, "blogger");
    ///        query.AppendQuery(QueryParamType.Stars, "4");
    ///        query.AppendQuery(QueryParamType.Status, "Fixed");
    ///        query.AppendQuery(QueryParamType.UpdatedDateMax, Utility.ToFriendlyDateString(DateTime.Today));
    ///        query.AppendQuery(QueryParamType.UpdatedDateMin, Utility.ToFriendlyDateString(DateTime.MinValue));
    ///        Console.WriteLine(query.GetQueryUri());
    ///        
    ///        IssuesFeed resultFeed = service.QueryIssue(query);
    ///        foreach (IssuesEntry item in resultFeed.Entries)
    ///        {
    ///            Console.WriteLine(item.Id);
    ///        }
    ///        Console.WriteLine("Total feed : " + resultFeed.Entries.Count);
    /// 
    ///        service.GetAllIssuesCompleted += ServiceGetAllIssuesCompleted;
    ///        service.GetAllIssuesAsync(null);
    ///    }
    /// 
    ///    private static void ServiceGetAllIssuesCompleted(object sender,
    ///                                                     GetAllFeedCompletedEventArgs&lt;IssuesFeed, IssuesEntry&gt; e)
    ///    {
    ///        Console.WriteLine("Total Issue Count : " + e.Result.Entries.Count);
    ///        Console.ReadLine();
    ///    } 
    /// }
    /// </code>
    /// </example>
    public sealed partial class ProjectHostingService
    {
    }
}